﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using PInitiatives.Models;

namespace PInitiatives.ViewModels
{
    public class CategoryViewModels
    {
    }

    public class CategoryDetailsViewModel
    {
        public int ID { get; set; }

        [Required]
        [Display(Name = "Nazwa")]
        public string Name { get; set; }

        [Required]
        [Display(Name= "Kategoria nadrzędna")]
        public int? Parent { get; set; }

        public CategoryDetailsViewModel(Category category)
        {
            this.ID = category.ID;
            this.Name = category.Name;
            this.Parent = category.Parent;
        }

        public CategoryDetailsViewModel() { }

        //public CategoryDetailsViewModel(string name, int parent)
        //{
        //    this.Name = name;
        //    this.Parent = parent; 
        //}
    }

    
}